<?php
define('TIME_NOW',time());
ini_set ('zend.ze1_compatibility_mode','off');
putenv("Asia/Saigon");
date_default_timezone_set('Asia/Bangkok');

define('CHECK_DOMAIN', 0);//check valid domain (tuannk)

####################################################################################################################
define('ROOT_PATH', str_replace(array('core/'),array(''),strtr(dirname( __FILE__ ) ."/",array('\\'=>'/'))));
$webroot=str_replace('\\','/','http://'.$_SERVER['HTTP_HOST'].(dirname($_SERVER['SCRIPT_NAME'])?dirname($_SERVER['SCRIPT_NAME']):''));
$webroot.=$webroot[strlen($webroot)-1]!='/'?'/':'';
define('WEB_ROOT',$webroot);
unset($webroot);
####################################################################################################################

define('OID_URL','');
define('STATIC_URL','http://rfc.html/');

define('WEB_DIR','/');
define('WEB_DOMAIN','rfc.html');// bookingvccorp.vn
define('WEB_NAME','rfc');

define('DIR_CACHE', ROOT_PATH."_cache/");
define('DIR_MODULE', ROOT_PATH."modules/");
define('CACHE_ON', 1);
define('REWRITE_ON', 1);//rewrite URL

define('REG_ON',true); // Bat dang ky thanh vien
define('REG_CAPTRA',1);
define('OPENID_ON',1); // Bat dang nhap bang openid
define('USER_ACTIVE_ON',1); // Bat acctive user qua email

define( 'AD_POST_WAIT' , 0); //Chế độ chờ đăng tiếp tin
define( 'AD_COINCIDE' , 1); //Tin trùng
define( 'USE_CAPTCHA' , 1); //Bật captcha

//my server 
$server_list=array('127.0.0.1/rfc/');

####################################################################################################################
define('TABLE_PREFIX',	'');

// Master server DB

define('DB_MASTER_SERVER', '127.0.0.1');
define('DB_MASTER_USER', 'root');
define('DB_MASTER_PASSWORD','');
define('DB_MASTER_NAME', 'rfc');

// Slave server  DB (for replicate db)
define('_DB_REPLICATE',false);
define('DB_SLAVE_SERVER','');
define('DB_SLAVE_USER','');
define('DB_SLAVE_PASSWORD','');
define('DB_SLAVE_NAME','');

//Set default charset DB : LATIN / UTF8
define('DB_CHARSET','UTF8');


####################################################################################################################
//$img_server_extra = array(
$storage_server = array(
    1=>array(
        'server_type'	=>'curl',//curl, ftp

        'secret_key' 	=> '9e0d4158cc8ba8a04683156f69282c0c',//For CURL only

        'host'=>'192.168.8.15',
        'user'=>'',//For FTP only
        'pass'=>'',//For FTP only
    ),
    /*999=>array(
                                    'server_type'	=>'ftp',

                                    //For curl
                                     'secret_key' 	=> '',

                                     //For ftp
                                     'host'=>'192.168.3.78',
                                     'user'=>'imgbooking',
                                     'pass'=>'2aGzQZDGEWZSwOD7zvj1',
                                 ),*/
);

//img server 
$img_server =   array(
    1=>'hotelbooking.vcmedia.vn/',
    /*999=>'imgbooking.todo.vn/',*/
);

define('IMAGE_SERVER_NO',1);
define('IMG_UPLOAD_TYPE', 1); // 1 - cUrl; 2 - FTP
define('IMAGE_PATH','http://hotelbooking.vcmedia.vn');

define('UP_FOLDER','up_img_dev');
define('MAX_UPLOAD_SIZE','1024');//Kb
####################################################################################################################


####################################################################################################################
define('MEMCACHE_ON', 0);

$memcache_server =  array(
    array("host"=>"192.168.6.174","port"=>"12311"),
);

define('MEMCACHE_ID','booking');

//System Constants
//Session config
/*
 memcache - session memcache
 db - session database
 file - session file
*/
define( 'SESSION_TYPE' , 'file');

define('MEMCACHE_SESSION_HOST', "192.168.6.174");
define('MEMCACHE_SESSION_PORT', "12311");

define('_SESS_TABLE', "rongbay_sessions_mem");//rongbay_sessions
define('_SESS_TIME_EXPIRE', "10800");
####################################################################################################################


####################################################################################################################
//config mail
define('SMTP_HOST','gw.smtp.vn');
define('SMTP_PORT',25);
define('SMTP_METHOD','smtp');//'mail';for Old style PHP Mailer
define('SMTP_AUTH',true);
define('SMTP_FROM_EMAIL',"noreply@oka.vn");
define('SMTP_USER','noreply@oka.vn');
define('SMTP_PASS','sC3INVjwfViIVKUg4gUP');
####################################################################################################################

define('EMAIL_ON', 				1);//Bật chức năng gửi mail
define('TEST_EMAIL', 			'');
define('TEST_SEND_EMAIL', 	    1);

$email_dev = array(
    'tlkit158@gmail.com',
    'thinhlekhac@vccorp.vn',
    'skeleton288@gmail.com'
);
// define email sting
$mail_sting_server = array(
    'server_type'	=>'curl',//curl, ftp
    'secret_key' 	=> 'c4520bc086986ede3425a8c5a13c6756',//For CURL only
    'domain'        =>'oka.todo.vn',
    'host'          =>'api.sting.todo.vn',
    'port'          =>'28110'
);


#####################################################################################################################
// config redis
define('REDIS_ON', 0);
$host ='192.168.4.21';
$install = '26379';
$redis_cf = array(
    // config host
    'host' => $host,
    'install'=> $install,

    // config server and db
    'default' => array(
        'servers' => array('host' => $host, 'port' =>$install,'db'=>0)),
    'prior'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>3)),
    'hotel'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>1)),
    'hotel_review'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>2)),
    'images'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>14)),

);
################################################################################################
// config mongodb
define('MONGO_ON',0);
$mongo_cf = array(
    'mongo_host' => 'localhost',
    'mongo_port' => 27017,
    'mongo_db' => 'test',
    'mongo_user' => '',
    'mongo_pass' => '',
    'mongo_persist' => TRUE,
    'mongo_persist_key' => 'ci_mongo_persist'
);
/* Domain name of the Solr server */
define('SOLR_SERVER_HOST', '192.168.3.16');
/* HTTP Port to connection */
define('SOLR_SERVER_PORT',7979);
/* Core name of the Solr server */
define('SOLR_SERVER_SEARCH', '/solr/Booking/');
define('SOLR_SERVER_SUGGEST', '/solr/AutoSuggestTermSpace');
define('SOLR_SERVER_CHECKROOM', '/solr/CheckRoom/');
define('SOLR_SERVER_ROOM', '/solr/Room/');
//define('SOLR_SERVER_ROOM', '/solr/RoomStatus/');
/* QT solr*/
define('QT_SOLR', '/bookingSearch');
?>